package org.ht.entity;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;

import org.azj.inireader.FieldBasicInfo;
import org.ht.config.ColumnInfoXmlReader;

/**
 * 子表的对象
 * 
 * @author HT
 * 
 */
public abstract class ChildEntity {

	public HashMap<String, String> property = new HashMap<String, String>();
	private String tableName;

	public ChildEntity(String tableName) {
		super();
		this.tableName = tableName;
		fillProperty();
	}

	private void fillProperty() {
		HashMap<String, FieldBasicInfo> map = ColumnInfoXmlReader
				.getXmlReader().getValuesByFields(tableName);
		Set<String> keys = map.keySet();
		Iterator<String> it = keys.iterator();
		while (it.hasNext()) {
			String key = it.next();
			property.put(key, null);
		}
	}

	// 检查本Entity是否是可以在大表中显示的（返回True表示可以在大表中显示）
	public boolean isPlainPropertyContainer() {
		return true;
	}
}
